<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - 页面迷失在宇宙中</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(45deg, #0a0a0a, #1a1a2e, #16213e, #0f3460);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            color: #ffffff;
            overflow: hidden;
            height: 100vh;
            position: relative;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
        }

        .star {
            position: absolute;
            background: #ffffff;
            border-radius: 50%;
            animation: twinkle 3s ease-in-out infinite alternate;
        }

        @keyframes twinkle {
            0% { opacity: 0.3; transform: scale(1); }
            100% { opacity: 1; transform: scale(1.2); }
        }

        .container {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            text-align: center;
            padding: 20px;
        }

        .error-code {
            font-size: 15vw;
            font-weight: bold;
            background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
            background-size: 300% 300%;
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            animation: gradientText 3s ease infinite, glow 2s ease-in-out infinite alternate;
            text-shadow: 0 0 50px rgba(255, 107, 107, 0.5);
            margin-bottom: 30px;
            line-height: 1;
        }

        @keyframes gradientText {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes glow {
            0% { 
                filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.7));
                transform: scale(1);
            }
            100% { 
                filter: drop-shadow(0 0 40px rgba(72, 219, 251, 0.9));
                transform: scale(1.05);
            }
        }

        .error-title {
            font-size: 3rem;
            margin-bottom: 20px;
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
            animation: float 4s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
        }

        .error-description {
            font-size: 1.3rem;
            margin-bottom: 40px;
            opacity: 0.8;
            max-width: 600px;
            line-height: 1.6;
            animation: fadeInUp 1s ease-out 0.5s both;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 0.8;
                transform: translateY(0);
            }
        }

        .home-button {
            background: linear-gradient(45deg, #667eea, #764ba2);
            border: none;
            padding: 15px 40px;
            font-size: 1.2rem;
            color: white;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
            animation: fadeInUp 1s ease-out 1s both;
        }

        .home-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .home-button:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 20px 40px rgba(102, 126, 234, 0.6);
        }

        .home-button:hover::before {
            left: 100%;
        }

        .astronaut {
            position: absolute;
            top: 20%;
            right: 10%;
            font-size: 5rem;
            animation: astronautFloat 6s ease-in-out infinite;
            transform-origin: center;
        }

        @keyframes astronautFloat {
            0%, 100% { 
                transform: rotate(-5deg) translateY(0px);
            }
            25% { 
                transform: rotate(5deg) translateY(-30px);
            }
            50% { 
                transform: rotate(-3deg) translateY(-15px);
            }
            75% { 
                transform: rotate(3deg) translateY(-40px);
            }
        }

        .planet {
            position: absolute;
            bottom: 10%;
            left: 10%;
            width: 120px;
            height: 120px;
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            border-radius: 50%;
            animation: planetRotate 20s linear infinite;
            box-shadow: 0 0 50px rgba(255, 107, 107, 0.5);
        }

        @keyframes planetRotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .particle {
            position: absolute;
            background: #48dbfb;
            border-radius: 50%;
            animation: particleFloat 8s linear infinite;
        }

        @keyframes particleFloat {
            0% {
                transform: translateY(100vh) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateY(-100px) rotate(360deg);
                opacity: 0;
            }
        }

        @media (max-width: 768px) {
            .error-code {
                font-size: 20vw;
            }
            
            .error-title {
                font-size: 2rem;
            }
            
            .error-description {
                font-size: 1.1rem;
                padding: 0 20px;
            }
            
            .astronaut {
                font-size: 3rem;
                top: 15%;
                right: 5%;
            }
            
            .planet {
                width: 80px;
                height: 80px;
                bottom: 5%;
                left: 5%;
            }
        }
    </style>
</head>
<body>
    <div class="stars" id="stars"></div>
    
    <div class="particles" id="particles"></div>
    
    <div class="container">
        <div class="error-code">404</div>
        <h1 class="error-title">页面迷失在宇宙中</h1>
        <p class="error-description">
            哎呀！你要找的页面似乎被外星人劫持了，或者在宇宙的某个角落里迷路了。
            不要担心，我们的宇航员正在努力寻找它！
        </p>
        <a href="/" class="home-button" id="homeButton">
            🚀 返回地球
        </a>
    </div>
    
    <div class="astronaut">🧑‍🚀</div>
    <div class="planet"></div>

    <script>
        function createStars() {
            const starContainer = document.getElementById('stars');
            const starCount = 200;
            
            for (let i = 0; i < starCount; i++) {
                const star = document.createElement('div');
                star.className = 'star';
                star.style.left = Math.random() * 100 + '%';
                star.style.top = Math.random() * 100 + '%';
                star.style.width = Math.random() * 3 + 1 + 'px';
                star.style.height = star.style.width;
                star.style.animationDelay = Math.random() * 3 + 's';
                star.style.animationDuration = (Math.random() * 2 + 2) + 's';
                starContainer.appendChild(star);
            }
        }

        function createParticles() {
            const particleContainer = document.getElementById('particles');
            const particleCount = 30;
            
            for (let i = 0; i < particleCount; i++) {
                const particle = document.createElement('div');
                particle.className = 'particle';
                particle.style.left = Math.random() * 100 + '%';
                particle.style.width = Math.random() * 4 + 2 + 'px';
                particle.style.height = particle.style.width;
                particle.style.animationDelay = Math.random() * 8 + 's';
                particle.style.animationDuration = (Math.random() * 3 + 6) + 's';
                particleContainer.appendChild(particle);
            }
        }

        function handleMouseMove(e) {
            const astronaut = document.querySelector('.astronaut');
            const planet = document.querySelector('.planet');
            
            const mouseX = e.clientX / window.innerWidth;
            const mouseY = e.clientY / window.innerHeight;
            
            astronaut.style.transform = `translate(${mouseX * 20 - 10}px, ${mouseY * 20 - 10}px)`;
            planet.style.transform = `translate(${mouseX * -15 + 7.5}px, ${mouseY * -15 + 7.5}px)`;
        }

        function addClickEffect(e) {
            const ripple = document.createElement('div');
            ripple.style.position = 'absolute';
            ripple.style.borderRadius = '50%';
            ripple.style.background = 'rgba(72, 219, 251, 0.6)';
            ripple.style.transform = 'scale(0)';
            ripple.style.animation = 'ripple 0.6s linear';
            ripple.style.left = (e.clientX - 25) + 'px';
            ripple.style.top = (e.clientY - 25) + 'px';
            ripple.style.width = '50px';
            ripple.style.height = '50px';
            ripple.style.pointerEvents = 'none';
            ripple.style.zIndex = '1000';
            
            document.body.appendChild(ripple);
            
            const style = document.createElement('style');
            style.textContent = `
                @keyframes ripple {
                    to {
                        transform: scale(4);
                        opacity: 0;
                    }
                }
            `;
            document.head.appendChild(style);
            
            setTimeout(() => {
                document.body.removeChild(ripple);
                document.head.removeChild(style);
            }, 600);
        }

        document.addEventListener('DOMContentLoaded', function() {
            createStars();
            createParticles();
            
            document.addEventListener('mousemove', handleMouseMove);
            document.addEventListener('click', addClickEffect);
            
            const homeButton = document.getElementById('homeButton');
            homeButton.addEventListener('click', function(e) {
                e.preventDefault();
                
                document.body.style.animation = 'fadeOut 0.5s ease-out';
                
                const style = document.createElement('style');
                style.textContent = `
                    @keyframes fadeOut {
                        to {
                            opacity: 0;
                            transform: scale(0.9);
                        }
                    }
                `;
                document.head.appendChild(style);
                
                setTimeout(() => {
                    window.location.href = '/';
                }, 500);
            });
        });
    </script>
</body>
</html>